package com.ncloud.system.mapper;

import com.ncloud.system.entity.DepartRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by shiqiang on 2017/8/1.
 */
@Mapper
public interface DepartRoleMapper {
    @Select(value = { "select * from sys_depart_role where role_id=#{0} and use_tag='1'" })
    @Results({ @Result(column = "depart_id", property = "departId"),
            @Result(column = "role_id", property = "roleId"),
            @Result(column = "use_tag", property = "useTag")
    })
    public List<DepartRole> getDepartRoleByRole(Long roleId);
}
